$def with (page)
<html lang="en">
  <head>
    <meta charset="utf-8">
	<link rel="stylesheet" href="/static/css/redmond/jquery-ui-1.10.4.custom.min.css">
	<script src="/static/js/jquery-1.10.2.js"></script>
	<script src="/static/js/jquery-ui-1.10.4.custom.min.js"></script>
	
	<!-- page js -->
	$for script in page.get('js','').split():	
		<script src="/static/js/$script"></script>
	
	<!-- page css -->
	$for css in page.get('css','').split():
		<link rel="stylesheet" href="/static/css/$(css)">
	
	<script>
		
		$$(function() {		
			//	Construct tabs
			$$("#navmenu").buttonset();
			$$("#navmenu2").buttonset();
		});	   
	  
		function onNavSelected(id) {
			var menubtn = $$("#" + id);
			var url = menubtn.attr("url");
			window.location = url;
		};
	</script>
	
    <title>$(page.get("title","Home"))</title>
  </head>
  
<body style="background-color:#111111;background-image:url(/static/images/background_root.jpg);background-size:100%;margin:30px;">
  
		<!-- header -->
		<div class="ui-widget-content ui-corner-all" style="text-align:right;padding:0 30px 0 30px;">
			</br>
			<b style="font-size:120%">$:(page.get("headline","Welcome  <span style='color:#F68B0D;'>" + session.user + "</span>"))</b></br>
			<span style="color:grey;">Rev-2</span>&nbsp;&nbsp;<a href="/login?action=logout">logout</a><br>
			</br>
		</div>
		
		</br>
		
		<!-- navbar-->
		<form>
			<div class="ui-widget-header ui-corner-all" style="width:100%;text-align:center;" id="navback">
			  <div id="navmenu">
				$for name, url in server.getSitePages():
					<input onclick="onNavSelected(this.id)" type="radio" id="$(url[1:])" name="radio" url="$(url)" $("checked" if ctx["path"].find(url)==0 else "")>
						<label for="$(url[1:])">$name</label>
					</input>
			  
			  </div>
			 </div>
		 </form>
		
		<!-- secondary navbar -->
		$if server.hasSubPages(): 
			<form>
				<div class="ui-widget ui-corner-all" style="text-align:center;" id="navback">
				  <div id="navmenu2">
					$for name, url in server.getSubPages():
						<input onclick="onNavSelected(this.id)" type="radio" id="$(url[1:].replace('/','_'))" name="radio" url="$(url)") $("checked" if url == ctx["path"] else "")>
							<label for="$(url[1:].replace('/','_'))">$name</label>
						</input>
				  </div>
				 </div>
			</form>
		
	<!-- content-->
	<center>
		<div class="ui-widget-content ui-corner-all" style="width:1024px;text-align:left;padding:20px;">
			$:page
			<div style="clear:both;"></div>
		</div>
	</center>
  
   <!-- footer-->
   </br>
	<div class="ui-widget ui-widget-content ui-corner-all">
		<center><b>Copyright</b> © 2014 <b>madl3x</b></center>
	</div>

  </body>
</html>
